package com.tony.mindwarning.service.impl;

import com.tony.mindwarning.mpper.UserMapper;
import com.tony.mindwarning.pojo.User;
import com.tony.mindwarning.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: UserServiceImpl
 * @Auther: 皮蛋布丁
 * @Date: 2021/04/06/22:34
 * @Description:
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    UserMapper userMapper;
    @Override
    public User userLogin(User user) {
        return userMapper.userLogin(user);
    }

    @Override
    public int getTotlCount() {
        return userMapper.getTotlCount();
    }

    @Override
    public List<User> getUserByPage(Map<String, Object> map) {
        return userMapper.getUserByPage(map);
    }

    @Override
    public int updateUserTypeById(int id, String ustate,int userId) {
        return userMapper.updateUserTypeById(id,ustate,userId);
    }

    @Override
    public int delUserById(int id,int userId) {
        return userMapper.delUserById(id,userId);
    }

    @Override
    public User findUserById(int id) {
        return userMapper.findUserById(id);
    }

    @Override
    public int updateUserById(User user) {
        return userMapper.updateUserById(user);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int updatePwdById(int id,String upass) {
        return userMapper.updatePwdById(id,upass);
    }

    @Override
    public Integer compareUno(String uno) {
        return userMapper.compareUno(uno);
    }
}
